<!DOCTYPE html>
<html lang="zn">
    <head>
        <meta charset="utf-8" />
        <title>{% block title %}{% endblock %}</title>
        <link rel="icon" type="image/x-icon" href="https://rskil.github.io/images/favicon.ico" />
        <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css')  }}" />
    </head>
   <body style="width: 100%;
                height: 100%;
                background-image: url(https://img-blog.csdnimg.cn/3ceb076f7ea8490bbc036eedc038a917.jpeg);
                background-repeat: no-repeat;
                background-size: 100% 100% ;
                background-attachment: fixed;">
        <!-- 导航栏-->
        <nav class="navbar navbar-expand-lg navbar-light" id="mainNav">
            <div class="container px-4 px-lg-5">
                <a class="navbar-brand" href="{{ url_for('index') }}">rskil</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
                    Menu
                    <i class="fas fa-bars"></i>
                </button>
                <div class="collapse navbar-collapse" id="navbarResponsive">
                    <ul class="navbar-nav ms-auto py-4 py-lg-0">
                        <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="{{ url_for('index') }}">主页</a></li>
                        <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="{{ url_for('about') }}">关于</a></li>
                        <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="{{ url_for('index') }}">开发详情</a></li>
                        <li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="{% block Logi %}{{ url_for('login') }}{% endblock %}">{% block Login %}Login{% endblock %}</a></li>
                    </ul>
                </div>
            </div>
        </nav>
        {# 闪现提醒 #}
        {% for message in get_flashed_messages() %}
            <div class="alert alert-danger">{{ message }}</div>
        {% endfor %}

        <!-- 登录页-->
        {% block yemei %}{% endblock %}

        <!-- 主体-->
        {% block zhuti %}
        <div style="height: 100%;margin-top: 10% ;margin-left: 40%; color:white;">
            <div style="width: 400px;height: 90px;display: flex;">
                <div style="width: 130px;height: 130px;">
                    <img src="{{ users['userimage'] }}" style="width: 120px; height: 120px;">
                </div>
                <div style="width: 200px;height: 200px;">
                    <ul style="	list-style: none;padding: 0px;margin: 0px;">
                        <li>账&nbsp;户&nbsp;I&nbsp;D&nbsp;:{% block user_id %}{% endblock %}</li>
                        <li>账户名称:{% block user_username %}{% endblock %}</li>
                        <li>账户类型:{% block user_remarks %}{% endblock %}</li>
                        <li>注册日期:{% block user_register %}{% endblock %}</li>
                    </ul>
                </div>
            </div>
            <p>-------------------------------------------------------</p>
            <div>
                <p>文章新建</p>
                <ul>
                    <li style="	list-style: none;padding: 0px;margin: 0px;">
                        <a href="{{ url_for('new') }}" style="color: black" methods='POST'>新建文章</a>
                    </li>
                </ul>
                <p>-------------------------------------------------------</p>
                <p>文章管理</p>
                {% for post in posts %}
                <ul>
                    <li style="	list-style: none;padding: 0px;margin: 0px;">
                        {{ post['title'] }}
                        <div style="display: flex;">
                            <div style="width: 60px;height: 36px;">
                                <form action="{{ url_for('edit',id=post['id']) }}" methods="POST">
                                    <input type="submit" value="编辑">
                                </form>
                            </div>

                            <div style="width: 60px;height: 36px;">
                                <form action="{{ url_for('delt',id=post['id']) }}" method="POST">
                                    <input type="submit" value="删除" onclick="return confirm('确定要删除嘛')" >
                                </form>
                            </div>
                        </div>
                    </li>
                </ul>
                {% endfor %}
                <p>-------------------------------------------------------</p>
            </div>
        </div>
        {% endblock %}

        <!-- 新建文章页面-->
        {% block new %} {% endblock %}

        <!-- 文章编辑-->
        {% block edit %} {% endblock %}

        <!-- 关于页面 -->
        {% block postye %} {% endblock %}


    </body>
</html>
